package com.hhf.cloud.apis;

import com.hhf.cloud.resp.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Daniel-黄海峰
 * @Description
 * @create 2024/3/2 15:18
 */
@FeignClient(value = "seata-account-service")
public interface AccountFeignApi {
    //扣减账户余额 AT
    @PostMapping("/account/decrease")
    Result decrease(@RequestParam("userId") Long userId, @RequestParam("money") Long money);

    //扣减账户余额TCC
    @PostMapping("/account/decreasetcc")
    Result decreaseTcc(@RequestParam("userId") Long userId, @RequestParam("money") Long money);
}
